package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.*;
import com.itheima.stock.pojo.entity.StockOuterMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author Administrator
* @description 针对表【stock_outer_market_index_info(外盘详情信息表)】的数据库操作Mapper
* @createDate 2024-06-30 09:11:21
* @Entity com.itheima.stock.pojo.entity.StockOuterMarketIndexInfo
*/
public interface StockOuterMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockOuterMarketIndexInfo record);

    int insertSelective(StockOuterMarketIndexInfo record);

    StockOuterMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockOuterMarketIndexInfo record);

    int updateByPrimaryKey(StockOuterMarketIndexInfo record);

    /**
     * 根据时间获取股票大盘数据
     * @param curDateTime 当前时间
     * @param mCodes 大盘代码
     * @return
     */
    List<OuterMarkDomain> getOuterByTime(@Param("curDateTime") Date curDateTime, @Param("mCodes") List<String> mCodes);

    /**
     * like代码返回代码和名称
     * @param curDateTime
     * @param searchStr
     * @return
     */
    List<LikesMarkDomain> getStockLikeCode(@Param("curDateTime") Date curDateTime, @Param("searchStr") Integer searchStr);

    /**
     * 根据code查询详情
     * @param code
     * @return
     */
    DescribeDomain getStockByCode(String code);

    List<StockweekklineDomain> getScreenWeekkline(@Param("curDateTime") Date curDateTime, @Param("stockCode") String stockCode);


    /**
     * 个股最新分时行情数据接口分析
     * @param stockCode
     * @return
     */
    StockRt1 getScreenSecondDetailInfo(@Param("stockCode") String stockCode, @Param("curDateTime") Date curDateTime);

    /**
     * 个股查询最新交易流水
     * @param stockCode
     * @return
     */
    List<StockAnInfoDomain> getScreenSecond(@Param("stockCode") String stockCode, @Param("openDate") Date openDate, @Param("curDateTime") Date curDateTime);

    /**
     * 批量插入外盘
     * @param outs
     * @return
     */
    int insertBatch(@Param("outs") List<StockOuterMarketIndexInfo> outs);
}
